/**
 * Authors - Oren Bracha, Rony Lahav & Yehuda Eterman
 * This class represents the Sleep command. It gets the parameter of the command (sleep time)
 * and performs the command when needed (by setting global flags on)
 */
public class CmdSleep implements ICmd{

	private String sleepTime; //how much time should we sleep?
	private String command;	//for printing
	
	CmdSleep(String sleepTime, String command){
		this.sleepTime=sleepTime;
		this.command=command;
	}
	
	//updates the peer's sleep period
	public void executeCmd(){
		Logger.getInstance().printCommandDetails("sleep", command);
		proj350.sleepPeriod = Integer.parseInt(sleepTime);
	}
}
